"""
@-*- coding: utf-8 -*-
@ python: 3.12.3
@ 创建者: JacksonCode
@ 创建时间: 2025/9/16
"""

import sys
from PyQt6.QtWidgets import QApplication, QMainWindow, QPushButton


class MainWindow(QMainWindow):
    def __init__(self):
        super().__init__()
        self.setWindowTitle("My Qt App")
        self.setGeometry(100, 100, 400, 300)

        self.button = QPushButton("Click Me!", self)
        self.button.setGeometry(150, 130, 100, 40)
        self.button.clicked.connect(self.on_button_click)

    def on_button_click(self):
        print("Button clicked!")


if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = MainWindow()
    window.show()
    sys.exit(app.exec())